package com.rabbitmq.demo.listener;

import com.rabbitmq.demo.conf.PublishSubscribeConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 发布订阅模式消费者1
 *
 * @Author yi.cheng
 * @Date 2023-7-12 16:15
 **/
@Slf4j
@Component
public class PublishSubscribeConsumer2 {

    @RabbitListener(queues = PublishSubscribeConfig.FANOUT_QUEUE_TWO)
    public void fanoutListen2(String msg) {
        log.info("发布订阅模式消费者2 消费了：{}",msg);
    }

}
